package com.qf.tms.service.impl;

import com.qf.tms.entity.Student;
import com.qf.tms.entity.StudentVO;
import com.qf.tms.entity.Subjects;
import com.qf.tms.entity.SubjectsVO;
import com.qf.tms.mapper.StudentMapper;
import com.qf.tms.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Map;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;

    @Override
    public int addStuMore(List<Student> studentList) {
        int i = studentMapper.addStuMore(studentList);
        return i;
    }

    @Override
    public int addStu(Student student) {
        return studentMapper.addStu(student);
    }

    @Override
    public int deleteStuById(int id) {
        return studentMapper.deleteStuById(id);
    }

    @Override
    public int deleteStuByIdMore(List<Integer> ids) {
        return studentMapper.deleteStuByIdMore(ids);
    }

    @Override
    public int updateStuById(Student student) {
        return studentMapper.updateStuById(student);
    }

    @Override
    public List<Student> selectStuById(int id) {
        return studentMapper.selectStuById(id);
    }

    @Override
    public List<Student> selectStu(Map<String, String> map) {
        return studentMapper.selectStu(map);
    }

    @Override
    public List<Student> select() {
        return studentMapper.select();
    }

    @Override
    public List<StudentVO> selectStuAndCmAll() {
        return studentMapper.selectStuAndCmAll();
    }

    @Override
    public List<Subjects> selectStuSubject(int stuId) {
        return studentMapper.selectStuSubject(stuId);
    }

    @Override
    public List<StudentVO> selectStuSubAndTeacher(int stuId) {
        return studentMapper.selectStuSubAndTeacher(stuId);
    }

    @Override
    public List<Subjects> findStuSubjectAll(int stuId) {
        return studentMapper.findStuSubjectAll(stuId);
    }

    @Override
    public Subjects findSubjectById(int subId) {
        return studentMapper.findSubjectById(subId);
    }
}
